import {types} from '.';
import {fromJS} from "immutable";

/**
 * DEFAULT REDUCER
 */
const defaultData = fromJS({
    statusList: [],
})

const sysStatus = (state = defaultData, {type, value}) => {
    if (value !== undefined && value !== null) {
        switch (type) {
            case types.STATUS_LOAD_DATA:
                return state.set('statusList', value);
            default:
                return state;
        }
    }
    return state;
}
export default sysStatus;
